package com.simple.accounting;

import android.annotation.SuppressLint;
import android.app.Application;
import android.content.Context;

import com.simple.accounting.db.DBManager;
import com.simple.accounting.db.UserDBManager;

/* 表示全局应用的类*/
public class UniteApp extends Application {

    @SuppressLint("StaticFieldLeak")
    private static Context sContext;

    @Override
    public void onCreate() {
        super.onCreate();
        sContext = getApplicationContext();
        // 初始化数据库
        DBManager.initDB(getApplicationContext());
        UserDBManager.initDB(getApplicationContext());
    }

    public static Context getContext(){
        return sContext;
    }
}
